Chris Pollett > Old Classes >
CS174

( Print View )

Student Corner:
  [Grades Sec2]
  [Grades Sec3]

  [Submit Sec2]
  [Submit Sec3]

  [Email List Sec2]
  [Email List Sec3]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












CS174 Fall 2006Practice Midterm 2

To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes at least three times. Second and third time try to see how much you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

[Student generated midterm solutions-PDF]

As stated in class, Problem 10 below will not be on the test.

1. Suppose you wanted to create a web page using only Javascript and XHTML that had a stop watch on it that could be stopped, started, and reset. Explain how you could do this making use of the setTimeout/clearTimeout functions.

2. Consider the following XML document for names:

<name>
<first>Chris </first>
<last>Pollett </last>
</name>

Give a DTD that could be used for this language.

3. Repeat Problem 2 but this time give an XML schema.

4. Write XSLT code that could be used to transform the document of Problem 2 above to the following:

<p><b>Name:</b> <i>Chris</i> Pollett</p>

5. Briefly explain what values the readyState property of an XMLHttpRequest object can take and what these values mean.

6. Give the SQL needed to create a table Name with two columns: First and Last each of which is VARCHAR(15).

7. Write a short Perl CGI program (not using CGI.pm) that could be used to maintain a count of the number of people who visit it on the web.

8. Suppose we have a form that uses POST with a text input field named First_Name and with action store.cgi. Write a Perl program store.cgi to take the data from the form and concatenate it to the end of the file store.txt . You may use CGI.pm .

9. Rewrite Problem 8 as a servlet.

10. Rewrite Problem 7 as a JSP.